package com.fan.jiekouhomework;

import java.util.Scanner;

public class Test1 {
    public static void main(String[] args) throws ClassNotFoundException, IllegalAccessException, InstantiationException {
        Scanner in = new Scanner(System.in);
        String next = in.next();
        Flyer flyer =(Flyer) Class.forName(next).newInstance();//newInstance就是调用构造方法
        flyer.fly();

    }
}
